<template>
  <div class="hello">
    <!-- <p>
      {{list.subjects}}

    </p> -->
    <h1>{{list.count}}</h1>
    </div>
  </div>
</template>

<script>
export default {
  name: 'hello',
  data(){
    return{
        list:[]
    }
  },
  mounted:function(){
    //do something after mounting vue instance
    this.$http.jsonp('https://api.douban.com//v2/movie/top250').then(function(res){
       console.log(res.body);
       this.list=res.body
       this.count = this.list.count
    },function(){
      // alert('请求失败')
    })
  }

}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
